#include<stdio.h>

int main()
{
	int num = 0,i = 0,a[8]={};
	printf("input a number :\n");
	scanf("%d",&num);

	for(;num > 0;num /= 10){
		a[i++] = num % 10;
	}
	
	for(i = i - 1;i >= 0;i --){
		printf("%d ",a[i]);
	}



	/*

	for(i = 0; i < 8;i ++){
		a[i] = num % 10;
		num /= 10;	
	}	
	
	for(i = 7;i >= 0;i --){
		printf("%d ",a[i]);
	}*/

	
	printf("\n");

	return 0;
}
